CI/CD tools

CI/CD tools

Clock Icon2021.05.19

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

What is CI / CD

CI (Continuous Integration)

Let's take example of a ramen restaurant, in which the different chefs bring in different ingredients to make a new ramen dish (product or features) in the kitchen, here the the chefs are the developers, ingredients are the code and kitchen is the code repository management platform like GitHub. Now in the kitchen the dish is made (build phase the code) and presented to the owner of the shop to taste (test phase of the code in the local machine). The chefs are continuously integrating new ingredients to make a good dish.

CD (Continuous Delivery / Deployment)

As the chefs are continuously integrating the ingredients and continuously presenting the dish to the owner (test done in the local repository). When the owner approves the dish, then now this dish is presented to the random customers and get their responses (production environment for) ) Development purpose), till this phase the is called Continuous Delivery, now if the dish gets good response, then the dish is put on menu and the dishes are taught to the other chefs in the restaurant (think the other chefs as the production) servers), Now one chef comes with a better ingredients than the before ones, so then we will have to teach about the new ingredients (updates to the products) to other chefs, this continuous Integration and continuous delivery is called continuous deployment.

This whole pipeline is tedious and time consuming because with neck-break speed new features are introduced to the products, that's why automation tools like AWS developer tools, GitHub actions, Jenkins, circleCI and etc are introduced. 

Now in this blog we will learn about two automation tools and comparison between GitHub actions and AWS CodePipeline:-

  1. AWS Developer Tools
  2. GitHub Actions

AWS Developer Tools

  1. CodeCommit -It is a code repository management tool like GitHub where many developers can commit their code.The repositories are private
  2. CodeBuild -After committing the code it has be tested in the production environment, from where we get the test results and errors which can be corrected immediately.
  3. CodeDeploy -Passing through the production environment, will have to deploy it at production level.
  4. CodePipeline -It is tough to manage the code build, commit and deploy separately, that's why code pipeline is introduced in which we can automate the build, test and deploy phases of your release process every time there is a code change, based on the release model you define.
  5. CodeStar -It enables you to quickly develop, build, and deploy applications on AWS. AWS CodeStar provides a unified user interface, enabling you to easily manage your software development activities in one place.Each AWS CodeStar project comes with a project management dashboard, including an integrated issue tracking capability powered by Atlasssian JIRA Software.
  6. Amazon Corretto -Amazon Corretto is a no-cost, multi-platform, production-ready distribution of the Open Java Development Kit (OpenJDK). Corretto is certified as compatible with the Java SE standard.
  7. AWS Cloud9 -AWS Cloud9 is a cloud-based integrated development environment (IDE) that lets you write, run, and debug your code with just a browser. It includes a code editor, debugger, and terminal.

GitHub Actions

It is similar to code pipeline but it there is slight changes to it.In this we have events (push or pull request) which will trigger a workflow which contains jobs. The jobs then use steps to control the order in which the action run.

The components of the GitHub actions

  1. Workflow --Workflows are made up of one or more jobs and can be scheduled or triggered by an event. The workflow can be used to build, test, package, release, or deploy a project on GitHub.
  2. Events --An event is a specific activity that triggers a workflow.For example, when someone pushes the code or pulls from the repository the workflow is triggered, this pull or push request are events.
  3. Jobs --A job is a set of steps that execute on the same runner. By default, a workflow with multiple jobs will run those jobs in parallel. You can also configure a workflow to run jobs sequentially.
  4. Steps --A step is an individual task that can run commands in a job. A step can be either an  action  or a shell command. Each step in a job executes on the same runner, allowing the actions in that job to share data with each other ..
  5. Runners --A runner is a server that has the GitHub Actions runner application installed. A runner listens for available jobs, runs one job at a time, and reports the progress, logs, and results back to GitHub.

    Comparison between the GitHub Actions and AWS CodePipeline

    • Both solutions are priced on a per build-minute. Additionally, AWS charges a fixed cost per month per pipeline. The advantage of GitHub Actions here is that a maximum amount of minutes is defined, so the final costs are easier to predict.
    • GitHub Actions only supports GitHub as a source code repository, while AWS CodePipeline also allows Bitbucket, AWS CodeCommit and Amazon S3.
    • GitHub Actions works with an open marketplace. AWS has its own built, high quality integrations.
    • The big advantage of CodePipeline is that authentication is handled with IAM roles instead of access keys for IAM users. With GitHub Actions, you must store the IAM user's access keys in GitHub secrets.
    • GitHub Actions is very easy to use, while CodePipeline is more difficult to get started with. CodePipeline will become more valuable as soon as you integrate it with other Amazon services (eg CodeBuild, CodeDeploy, and more)

All the Image references-

https://docs.github.com/en/actions/learn-github-actions/introduction-to-github-actions

The Importance of Implementing CI/CD Pipelines on the Cloud

DevOps – Secure and Scalable CI/CD Pipeline with AWS

Share this article

facebook logohatena logotwitter logo

© Classmethod, Inc. All rights reserved.